import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2024-04-18
 * Time: 22:33
 */
public class Demo1 {
    public static void main(String[] args) throws FileNotFoundException {
        try(Reader reader=new FileReader("d:text.txt")){
            while(true) {
                int c = reader.read();
                if (c == -1) {
                    return;
                }
                char ch = (char) c;
                System.out.println(ch);

            }

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
